package system.model;

import java.math.BigDecimal;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Syresources entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "syresources", catalog = "sypro")
public class Syresources implements java.io.Serializable {

	// Fields

	private String id;
	private Syresources syresources;
	private String descript;
	private String onoff;
	private BigDecimal seq;
	private String src;
	private String text;
	private String menuId;
	private Set<Syresources> syresourceses = new HashSet<Syresources>(0);
	private Set<SyroleSyresources> syroleSyresourceses = new HashSet<SyroleSyresources>(
			0);

	// Constructors

	/** default constructor */
	public Syresources() {
	}

	/** minimal constructor */
	public Syresources(String id, BigDecimal seq) {
		this.id = id;
		this.seq = seq;
	}

	/** full constructor */
	public Syresources(String id, Syresources syresources, String descript,
			String onoff, BigDecimal seq, String src, String text,
			String menuId, Set<Syresources> syresourceses,
			Set<SyroleSyresources> syroleSyresourceses) {
		this.id = id;
		this.syresources = syresources;
		this.descript = descript;
		this.onoff = onoff;
		this.seq = seq;
		this.src = src;
		this.text = text;
		this.menuId = menuId;
		this.syresourceses = syresourceses;
		this.syroleSyresourceses = syroleSyresourceses;
	}

	// Property accessors
	@Id
	@Column(name = "ID", unique = true, nullable = false, length = 36)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PID")
	public Syresources getSyresources() {
		return this.syresources;
	}

	public void setSyresources(Syresources syresources) {
		this.syresources = syresources;
	}

	@Column(name = "DESCRIPT", length = 100)
	public String getDescript() {
		return this.descript;
	}

	public void setDescript(String descript) {
		this.descript = descript;
	}

	@Column(name = "ONOFF", length = 1)
	public String getOnoff() {
		return this.onoff;
	}

	public void setOnoff(String onoff) {
		this.onoff = onoff;
	}

	@Column(name = "SEQ", nullable = false, precision = 22, scale = 0)
	public BigDecimal getSeq() {
		return this.seq;
	}

	public void setSeq(BigDecimal seq) {
		this.seq = seq;
	}

	@Column(name = "SRC", length = 200)
	public String getSrc() {
		return this.src;
	}

	public void setSrc(String src) {
		this.src = src;
	}

	@Column(name = "TEXT", length = 100)
	public String getText() {
		return this.text;
	}

	public void setText(String text) {
		this.text = text;
	}

	@Column(name = "menuId", length = 36)
	public String getMenuId() {
		return this.menuId;
	}

	public void setMenuId(String menuId) {
		this.menuId = menuId;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "syresources")
	public Set<Syresources> getSyresourceses() {
		return this.syresourceses;
	}

	public void setSyresourceses(Set<Syresources> syresourceses) {
		this.syresourceses = syresourceses;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "syresources")
	public Set<SyroleSyresources> getSyroleSyresourceses() {
		return this.syroleSyresourceses;
	}

	public void setSyroleSyresourceses(
			Set<SyroleSyresources> syroleSyresourceses) {
		this.syroleSyresourceses = syroleSyresourceses;
	}

}